package cn.bgs.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 小区表
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Community对象", description="小区表")
public class Community implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "小区id")
    @TableId(value = "community_id", type = IdType.AUTO)
    private Integer communityId;

    @ApiModelProperty(value = "小区名称")
    private String communityName;

    @ApiModelProperty(value = "小区编号")
    private String communityNumber;

    @ApiModelProperty(value = "所属地区")
    private String area;

    @ApiModelProperty(value = "详情地址")
    private String address;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "建成时间")
    private LocalDateTime builtTime;

    @ApiModelProperty(value = "房屋用途（普通住宅、商业用地、商住两用）")
    private Integer houseUse;

    @ApiModelProperty(value = "小区面积")
    private Integer plotArea;

    @ApiModelProperty(value = "楼栋数量")
    private Integer buildingSum;

    @ApiModelProperty(value = "临时停车场车位数量")
    private Integer temporaryCarSum;

//    @ApiModelProperty(value = "图片")
//    private String fileUrl;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标识（y是删除 n是未删除）")
    private String deleteFlag;


}
